package com.lhn;

import com.lhn.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author lhn
 * @date 2024-08-17 18:44
 */

public class AppForAutowired {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("application.xml");
        BookService bookService = (BookService) ctx.getBean("bookService");
        bookService.save();
    }
}
